<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
        body, html,.mapContainer,#allmap{width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微软雅黑";}
        .mapContainer{
            background: transparent;
            height: 300px;
        }
        #allmap{
            width: 80%;
            margin: 20px auto;
        }
    </style>

    <title>地图展示</title>
</head>
<body>
<div class="mapContainer">
    <div id="allmap"></div>
</div>

<!-- 192.168.120.78 obpQdbc8Miaw1vi5manpX8UtmWoFk7IL-->
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=obpQdbc8Miaw1vi5manpX8UtmWoFk7IL"></script>
</body>
</html>
<script type="text/javascript">
    // 百度地图API功能
    var map = new BMap.Map("allmap");    // 创建Map实例
    var point = new BMap.Point(116.497098,39.981059)
    map.centerAndZoom(point, 19);  // 初始化地图,设置中心点坐标和地图级别
    //添加地图类型控件
    map.addControl(new BMap.MapTypeControl({
        mapTypes:[
            BMAP_NORMAL_MAP,
            BMAP_HYBRID_MAP
        ]}));
    map.setCurrentCity("北京");          // 设置地图显示的城市 此项是必须设置的
    map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放
    var marker = new BMap.Marker(point);  // 创建标注
    map.addOverlay(marker);               // 将标注添加到地图中
    marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画


    var circle = new BMap.Circle(point,25,{fillColor:"blue", strokeWeight: 1 ,fillOpacity: 0.2, strokeOpacity: 0.8});
    map.addOverlay(circle);
    var local =  new BMap.LocalSearch(map, {renderOptions: {map: map, autoViewport: false}});
//    local.searchNearby('gonsi',point,1000);
    var opts = {
        width : 250,     // 信息窗口宽度
        height: 100,     // 信息窗口高度
        title : "金投手金融信息服务（北京）有限公司" , // 信息窗口标题
        enableMessage:true//设置允许信息窗发送短息
    }
    var infoWindow = new BMap.InfoWindow("我在：电子科技城大厦二层");  // 创建信息窗口对象
    marker.addEventListener("click", function(){
        map.openInfoWindow(infoWindow,point); //开启信息窗口
    });

</script>